<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>

</style>
<body>
<input type="text" placeholder="ask...">
<button onclick="send()">发送</button>
<div>

</div>
</body>
</html>
<script>
var send = function(){
    var source = new EventSource('/service/quest');
    source.onmessage = function(e) {
        console.log(e);
    };
    source.addEventListener('finish',
    function(event) {
    console.log('close');
        source.close()
    });
}


</script>